Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect logger_class setting unless statsd is on #853

Merged
merged 1 commit into from
Aug 16, 2014

Conversation

alq666
Copy link
Contributor

@alq666 alq666 commented Aug 16, 2014

This should fix #848.

If --statsd-host is set to some value, it will set logger_class to the StatsD logger. If the option is not present it respects any logger_class that is passed as an option.

# if statsd is on, automagically switch to the statsd logger
if 'statsd_host' in self.settings:
if 'statsd_host' in self.settings and self.settings['statsd_host'].value is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be written simply as if self.settings.get('statsd_host') is not None

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my style. Ignore me. It's fine :-D
🍻

@tilgovi
Copy link
Collaborator

tilgovi commented Aug 16, 2014

Thanks for checking into this. The fix looks good.

tilgovi added a commit that referenced this pull request Aug 16, 2014
Respect logger_class setting unless statsd is on
@tilgovi tilgovi merged commit 88804ae into benoitc:master Aug 16, 2014
@berkerpeksag
Copy link
Collaborator

I've just ran make -C docs html to update the docs/source/settings.rst file: 9adf122

The online documentation is up-to-date.

@tilgovi
Copy link
Collaborator

tilgovi commented Aug 18, 2014

Thanks, @berkerpeksag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gunicorn 19.1 seems to ignore --logger-class because the stats_host config is set by default
3 participants